package com.rui.service.impl;

import com.rui.dao.StudentSubjectDao;
import com.rui.entity.StudentSubject;
import com.rui.service.StudentSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/4/14.
 */
@Service
public class StudentSubjectServiceImpl implements StudentSubjectService {

    @Autowired
    private StudentSubjectDao studentSubjectDao;

    public void add(StudentSubject studentSubject) {
        studentSubjectDao.add(studentSubject);
    }

    public void delete(Integer id) {
        studentSubjectDao.delete(id);
    }

    public void update(StudentSubject studentSubject) {
        studentSubjectDao.update(studentSubject);
    }

    public StudentSubject findOne(Integer id) {
        return studentSubjectDao.findOne(id);
    }

    public List<StudentSubject> findStudentSubjects(String realName, String subName, Integer pageSize, Integer pageIndex) {
        return studentSubjectDao.findStudentSubjects(realName,subName,pageSize,pageIndex);
    }

    public Integer findTotalPage(String realName, String subName, Integer pageSize) {
        return studentSubjectDao.findTotalPage(realName,subName,pageSize);
    }

    public Integer findCount(Integer stuId, Integer subId, Integer id) {
        return studentSubjectDao.findCount(stuId,subId,id);
    }

    public List<StudentSubject> findPersonSubjects(Integer stuId, Integer pageSize, Integer pageIndex) {
        return studentSubjectDao.findPersonSubjects(stuId,pageSize,pageIndex);
    }

    public Integer findTotalPage(Integer stuId, Integer pageSize) {
        return studentSubjectDao.findTotalPage(stuId,pageSize);
    }
}
